@echo off
rem Invocador batch del importador
rem
rem importar.bat,v 1.2 2006/11/13 13:46:51 mgriffa Exp
rem
rem Informacion de la version:
rem Fecha (aaaammdd) = @DSTAMP@
rem Hora (hhmm) = @TSTAMP@
rem
rem Miguel Griffa
rem

if not "%JAVA_HOME%" == "" goto gotJdkHome
echo La variable de entorno JAVA_HOME debe estar definida para ejecutar este .bat
goto exit

:gotJdkHome
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
goto okJavaHome

:okJavaHome
set _RUNJAVA=%JAVA_HOME%\bin\java.exe
echo Usando %_RUNJAVA%
goto startapp

:noJavaHome
echo Problemas con la variable JAVA_HOME=%JAVA_HOME%
goto exit

:startapp
rem todos los directorios deben ser absolutos, directivas del bco
set INSTALL_DIR=.

set CLASSPATH=%INSTALL_DIR%
set CLASSPATH=%CLASSPATH%;%INSTALL_DIR%\deps.jar
set CLASSPATH=%CLASSPATH%;%INSTALL_DIR%\sonic-prestamos.jar

set MAINCLASS=net.technisys.text.parsing.prestamos.SecureProperties

set JAVA_OPTS=-Xmx800m -Djava.io.tmpdir=%INSTALL_DIR%

rem Esta version requiere los dos parametros de linea de comandos
set CMD="%_RUNJAVA%" %JAVA_OPTS%  %MAINCLASS%
%CMD% %*
exit /b %errorlevel%
goto end

:exit

echo Salida no exitosa del programa con status 1
exit /b 1

:end
